﻿@model IEnumerable<GSLMS.Entity.TB_APP_PROMETINFO>
@{
    Layout = null;
    int i = 0;
    bool actionto = string.IsNullOrEmpty(Request["actionto"]) ? false : Request["actionto"].Equals("read");  
}
<div class="pageContent">
    <form method="post" action="DianDang/Apply/ProInfo/MetInfoCreate?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone)">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="90">
        <table class="list nowrap" width="95%">
            <thead>
                <tr>
                    <th>
                        序号
                    </th>
                    <th>
                        资料名称
                    </th>
                    <th>
                        原件
                    </th>
                    <th>
                        复印件
                    </th>
                    <th>
                        份数
                    </th>
                    <th>
                        备注
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                { 
                    <tr>
                        <td>
                            @(i+1)
                            @Html.Hidden("MetInfoList[" + i + "].ID", item.ID)
                            @Html.Hidden("MetInfoList[" + i + "].PROID", item.PROID)
                            @Html.Hidden("MetInfoList[" + i + "].REGINFOID", item.REGINFOID)
                            @Html.Hidden("MetInfoList[" + i + "].MetInfoDetailID", item.MetInfoDetailID)
                            @Html.Hidden("MetInfoList[" + i + "].SortNo", item.SortNo)
                        </td>
                        <td>
                            @Html.Hidden("MetInfoList[" + i + "].INFONAME", item.INFONAME)
                            @item.INFONAME
                            
                        </td>
                        <td>
                           @* @Html.CheckBox("MetInfoList[" + i + "].ORIGINAL", item.ORIGINAL == 1)*@
                           <input name='MetInfoList[@i].ORIGINAL' type="checkbox" value="1" @(item.ORIGINAL == 1 ? "checked='true'" : "")  /> 
                        </td>
                        <td>
                           @* @Html.CheckBox("MetInfoList[" + i + "].ORICOPY",item.ORICOPY==1)*@
                            <input name='MetInfoList[@i].ORICOPY' type="checkbox" value="1" @(item.ORICOPY == 1 ? "checked='true'" : "")  /> 
                           
                        </td>
                        <td>
                            @Html.TextBox("MetInfoList[" + i + "].COPIES", (item.COPIES == 0 ? "" : item.COPIES.ToString()), new { @class = "number" })
                        </td>
                        <td>
                            @Html.TextBox("MetInfoList[" + i + "].REMARK", item.REMARK)
                        </td>
                    </tr>
                    i += 1;
                }
            </tbody>
        </table>
    </div>
    @if (!actionto)
    {
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            保存</button></div>
                </div>
            </li>
        </ul>
    </div>
    }
    

    </form>
</div>
